pp108 : Configuring document store connector with apache cxf library

Configuring document store connector with apache cxf library

Process Platform document store connector uses JAX-WS APIs internally to integrate with various repositories like Content Server, CMIS compliant repositories, and so on. Document store by default  uses JAX-WS implementation that comes along with Java and the implementation is very basic.

Apache-CXF is a more advanced implementation of JAX-WS and can be used with the document store connector. 

To configure the document store connector with the Apache CXF library, you need to generate the cxfcp.jar and then configure with Apache-CXF.

To generate the cxfcp.jar:

  1. Download the Apache CXF binaries from this link and extract it to a folder on the file system. 
  2. Generate the cxfcp.jar as follows:
    Note: Apache-CXF includes lot of libraries and jars. To avoid using a lengthy classpath for the document store service container, the following steps are recommended to generate a single jar, such as cxfcp.jar that internally refers to multiple Apache CXF client jars. 
    1. Ensure to have ANT installed on the system and the environment variable ANT_HOME mapped to the ANT installation directory.
    2. Create an ANT build file in the << APACHE_CXF_HOME>>\lib folder. The build file must have all the jars present in the << APACHE_CXF_HOME>>\lib folder listed in the manifest.
    3. Generate a single cxfcp.jar using the ANT build script. 
      D:\apache-cxf\lib>ant -f build.xml
      Buildfile: D:\apache-cxf\lib\build.xml
      cxfcp_jar:
       [jar] Building MANIFEST-only jar: D:\apache-cxf\lib\cxfcp.jar
      BUILD SUCCESSFUL
      Total time: 0 seconds
      D:\apache-cxf\lib>
  3. A cxfcp.jar is generated in the same directory, that is, << APACHE_CXF_HOME>>\lib that internally refers to all the Apache CXF libraries. Refer to this jar in the CLASSPATH of any Java application wherever you intend to refer to Apache CXF JAX-WS client libraries.

To configure document store with Apache-CXF:

  1. Select the document store service container. Right-click > Open the document store service container properties.
  2. Navigate to the JRE Configuration tab.
  3. Update the JRE classpath with the absolute path to cxfcp.jar, which is generated above.
  4. Add the following JVM argument to switch to the Apache CXF JAX-WS implementation.
    -Djavax.xml.ws.spi.Provider=org.apache.cxf.jaxws.spi.ProviderImpl
  5. Restart the service container.

 

 

 

Attachments: